package com.ssb.admin.modules.sys.log.service.impl;

import com.ssb.admin.modules.sys.log.entity.SysLog;
import com.ssb.admin.modules.sys.log.dao.SysLogDao;
import com.ssb.admin.modules.sys.log.service.ISysLogService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 系统日志 服务实现类
 * </p>
 *
 * @author duaichao
 * @since 2018-08-23
 */
@Service
public class SysLogServiceImpl extends ServiceImpl<SysLogDao, SysLog> implements ISysLogService {
    /**
     * 异步写入数据库
     *
     * @param sysLog 参数
     */
    @Override
    public void asynInsert(SysLog sysLog) {
        //创建一个线程
        Runnable runnable = () -> baseMapper.insert(sysLog);
        runnable.run();
    }
}
